/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package common.xmlObjects;

/**
 *
 * @author Richard Irons
 */
public class XMLRootNode extends XMLNode {
    private static final String XMLHEADER = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>";

    public XMLRootNode() {
        this("","");
    }
    public XMLRootNode(String nodeName, String nodeData) {
        super(nodeName, nodeData);
        setNodeType(ROOT);
    }
    @Override
    public String toString() {
        String xml = XMLHEADER + "\n";
        xml += super.toString();
        return xml;
    }
    @Override
    public String toXMLString() {
        String xml = XMLHEADER;
        xml += super.toXMLString();
        return xml;
    }
}
